//
// Created by root on 2020/4/28.
//

#ifndef HEATBEATSERVER_ROOM_H
#define HEATBEATSERVER_ROOM_H

#include <set>

#include <muduo/base/Singleton.h>

class CRoom {
public:
    CRoom(const std::string &_csRoomId,
            const std::string &_csClientId01,
            const std::string &_csClientId02);
    ~CRoom();

    std::string GetRoomId() const {
        return m_sRoomId;
    }

    bool ContainChatName(const std::string &_sClient) const;
    std::set<std::string> GetClients() const {
        return m_setClient;
    }

public:
    bool operator==(const CRoom& _coRoom) const;
    bool operator==(const std::string &_csRoomId) const ;
    bool operator<(const CRoom& _coRoom) const;
    bool operator>(const CRoom& _coRoom) const;

private:
    std::string m_sRoomId; // 房间名称
    std::set<std::string> m_setClient;
};

#endif //HEATBEATSERVER_ROOM_H
